# 2 - 3 - 1
def AND(x1, x2):
    w1, w2, theta = 0.5, 0.5, 0.7
    tmp = x1 * w1 + x2 * w2 
    if tmp <= theta:
        return 0
    else: return 1

if __name__ == "__main__":
    lt = [(0, 0), (1, 0), (0, 1), (1, 1)]
    for t in lt:
        x, y = t[0], t[1]
        print(AND(x, y))